const nodata = require('../tw-lib-base/no-data/props')
const commonProps = require('../tw-lib-base/chart/common-props')
const axisProps = require('../tw-lib-base/chart/axis-props')
const datazoomProps = require('../tw-lib-base/chart/datazoom-props')
const tooltipProps = require('../tw-lib-base/chart/tooltip-props')

module.exports = {
  ...commonProps,

  ...axisProps,
  ...datazoomProps,
  ...tooltipProps,

  data: {
    type: Array,
    default () {
      return [
        {
          "name": "",
          "sourcenode": "",
          "symbolSize": 80,
          "category": 0
        },
        {
          "name": "阳光指数",
          "sourcenode": "阳光指数",
          "color1": "#fff",
          "color2": "#657df5",
          "symbolSize": 100,
          "fontSize": "24",
          "category": 0
        },
        {
          "name": "创新指数",
          "sourcenode": "创新指数",
          "color1": "#fff",
          "color2": "#ffb336",
          "symbolSize": 60,
          "fontSize": "16",
          "category": 0
        },
        {
          "name": "发展指数",
          "sourcenode": "发展指数",
          "color1": "#fff",
          "color2": "#4ac7ff",
          "fontSize": "16",
          "symbolSize": 60,
          "category": 0
        },
        {
          "name": "服务指数",
          "sourcenode": "服务指数",
          "color1": "#fff",
          "color2": "#2bd3bd",
          "fontSize": "16",
          "symbolSize": 60,
          "category": 0
        },

      ]
    },
    name: '图表数据集',
    filedType: 'api'
  },
  datalink: {
    type: Array,
    default () {
      return [
        {
          "value": 1,
          "source": "阳光指数",
          "target": ""
        },
        {
          "value": 1,
          "source": "创新指数",
          "target": ""
        },
        {
          "value": 1,
          "source": "发展指数",
          "target": ""
        },
        {
          "value": 1,
          "source": "服务指数",
          "target": ""
        },

      ]
    },
    name: '图表数据集',
    filedType: 'api'
  },
  height: {
    type: String,
    default: '300px',
    name: '图表容器高度',
    filedType: 'string'
  },
  seriesWidth: {
    type: String,
    default: '60',
    name: '内图宽度',
    filedType: 'string'
  },

  repulsion: {
    type: String,
    default: '1',
    name: '斥力因子',
    filedType: 'string'
  },

  edgeLength: {
    type: String,
    default: '1',
    name: '节点距离',
    filedType: 'string'
  },

  useLiandong: {
    type: Boolean,
    default: true,
    name: '启用点击事件',
    filedType: 'switch'
  },

  value: {
    type: String,
    default: '',
    name: '选中菜单标题',
    filedType: 'value',
    dataSource: {
      from: 'list',
      type: 'array',
      labelKey: 'label',
      valueKey: 'value'
    }
  },

  ...nodata

}
